package fr.umlv.ig.model;

import java.awt.geom.Point2D;
import fr.umlv.ig.listener.TrainListener;

/**
 * Represents a model for a Train
 * @author Jenseric Catbgan
 * @author William Choy
 *
 */
public interface TrainModel {
	
	/**
	 * Returns the {@link Itinerary}  of in parameter.
	 * @param train the train.
	 * @return return the {@link Itinerary} of the train in parameter
	 */
	public Itinerary getItinerary(Train train);
	
	/**
	 * Returns last Station visited by the Train.
	 * @param train the Train.
	 * @return the last {@link Station} visited by the Train.
	 */
	public Station getCurrentStation(Train train);
	
	/**
	 * Returns the next station of the train in parameter.
	 * @param train the Train.
	 * @return the next station of the train in parameter.
	 */
	public Station getNextStation(Train train);
	
	/**
	 * Returns a {@link Point2D} which represents the coordinate of a train.
	 * @param train the Train.
	 * @return return a {@link Point2D} which represents the coordinate of a train.
	 */
	public Point2D getCoordinate(Train train);
	
	/**
	 * Returns the {@link Line} where is the train.
	 * @param train the Train.
	 * @return the line where is the train.
	 */
	public Line getLine(Train train);
	
	/**
	 * Returns the terminus of a Train.
	 * @param train The Train 
	 * @return the terminus of the train in paramer.
	 */
	public Station getTerminus(Train train);
	
	/**
	 *  Returns true if the train is moving of false if it is in a station.
	 * @param train the train.
	 * @return true if the train is moving of false if it is in a station.
	 */
	public boolean isMoving(Train train);
	
	/**
	 * Returns true if the train is selected or false it it is not.
	 * @param train the train.
	 * @return true if the train is selected or false if it is not
	 */
	public boolean isSelected(Train train);
	
	/**
	 * Adds a {@link TrainListener} to the model.
	 * @param listener the {@link TrainListener} to be added.
	 */  
	public void addTrainListener(TrainListener listener);
	
	/**
	 * Removes a {@link TrainListener} to the model.
	 * @param listener the {@link TrainListener} to be removed.
	 */  
	public void removeTrainListener(TrainListener listener);

}
